<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/19 0019
 * Time: 下午 6:42
 */
namespace app\article\validate;
class ValiReply{
    const errmsg =[
        'comment_id.require'    =>10011,
        'from_userid.require'   =>10021,
        'from_userid.checkUserID'   =>10032,#用户不存在
        'reply_id.require'      =>10011,
        'reply_type.require'    =>10011,
        'content.require'       =>10011,
        'to_userid.require'     =>10011,
        'id.require'            =>10011,
        'id.checkReplyId'       =>10011,
    ];
    static function reply_add(){
        $rule =[
            'from_userid'   =>'require',
            'comment_id'    =>'require',
            'reply_id'      =>'require',
            'reply_type'    =>'require',
            'content'       =>'require',
            'to_userid'     =>'require',
        ];
        $message = self::errmsg;
        return ['rule'=>$rule,'message'=>$message];
    }
    static function reply_del(){
        $rule =[
            'id'   =>'require|checkReplyId',
        ];
        $message = self::errmsg;
        return ['rule'=>$rule,'message'=>$message];
    }
    static function myReply_list(){
        $rule =[
            'from_userid'   =>'require|checkUserID',
        ];
        $message = self::errmsg;
        return ['rule'=>$rule,'message'=>$message];
    }
}